package com.bigdata.demo.client;


import com.bigdata.demo.domain.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by root on 2/27/18.
 */
@FeignClient("provider")
public interface UserClient {

    @RequestMapping(value = "api/userMysql/{id }", method = RequestMethod.GET)
    User findById(@PathVariable("id") Integer id);

    @RequestMapping(value="api/userMysql", method=RequestMethod.GET)
    List<User> findAll();
}
